unify(ini): Merge and move INI parser files to Core#2863
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/Common/MultiplayerSettings.cpp | Adds addStartingMoneyChoice implementation and initializes m_gotDefaultStartingMoney in the constructor; logic is correct but uses 2-space indentation inconsistent with the rest of the file (tab-indented). |
| Core/GameEngine/CMakeLists.txt | Enables 24 INI source files previously commented out; straightforward and consistent with the unification goal. |
| Generals/Code/GameEngine/CMakeLists.txt | Comments out the same 24 INI files that were moved to Core, preventing duplicate symbol definitions; correct and symmetric with Core's changes. |
| GeneralsMD/Code/GameEngine/CMakeLists.txt | Same pattern as Generals — comments out the 24 INI files now provided by Core; correct. |
| Core/GameEngine/Source/Common/INI/INIMultiplayer.cpp | Full implementation of parseMultiplayerStartingMoneyChoiceDefinition is present; correctly calls TheMultiplayerSettings->addStartingMoneyChoice which is now implemented in both Generals and GeneralsMD builds. |
| scripts/cpp/unify_move_files.py | Adds 24 commented-out unify_file calls to record completed work; no functional change. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[INI File: MultiplayerStartingMoneyChoice] --> B[INI::parseMultiplayerStartingMoneyChoiceDefinition\nCore/GameEngine/Source/Common/INI/INIMultiplayer.cpp]
B --> C{isDefault?}
C -- yes --> D[DEBUG_ASSERTCRASH if already have default]
D --> E[TheMultiplayerSettings->addStartingMoneyChoice]
C -- no --> E
E --> F[m_startingMoneyList.push_back]
E --> G{isDefault?}
G -- yes --> H[m_defaultStartingMoney = money\nm_gotDefaultStartingMoney = true]
G -- no --> I[Done]
H --> I
subgraph "Build Sources - Before PR"
J[Generals/Code/.../INIMultiplayer.cpp stub impl]
K[GeneralsMD/Code/.../INIMultiplayer.cpp full impl]
end
subgraph "Build Sources - After PR"
L[Core/GameEngine/.../INIMultiplayer.cpp full impl - shared]
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[INI File: MultiplayerStartingMoneyChoice] --> B[INI::parseMultiplayerStartingMoneyChoiceDefinition\nCore/GameEngine/Source/Common/INI/INIMultiplayer.cpp]
B --> C{isDefault?}
C -- yes --> D[DEBUG_ASSERTCRASH if already have default]
D --> E[TheMultiplayerSettings->addStartingMoneyChoice]
C -- no --> E
E --> F[m_startingMoneyList.push_back]
E --> G{isDefault?}
G -- yes --> H[m_defaultStartingMoney = money\nm_gotDefaultStartingMoney = true]
G -- no --> I[Done]
H --> I
subgraph "Build Sources - Before PR"
J[Generals/Code/.../INIMultiplayer.cpp stub impl]
K[GeneralsMD/Code/.../INIMultiplayer.cpp full impl]
end
subgraph "Build Sources - After PR"
L[Core/GameEngine/.../INIMultiplayer.cpp full impl - shared]
end
Reviews (2): Last reviewed commit: "unify(ini): Move INI parser files to Cor..." | Re-trigger Greptile
xezon
left a comment
There was a problem hiding this comment.
Looks good. Commit titles need pull id.
d477f32 to
6bd07d5
Compare
Generals gains "MultiplayerSettings::addStartingMoneyChoice", doesn't affect user facing UI.
Move 24 files from GeneralsMD/Code/GameEngine/Source/Common/INI/* to Core/GameEngine/Source/Common/INI/*